﻿<UserControl
    x:Class="Markup.Programming.Samples.CrashSample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:p="http://markupprogramming.codeplex.com/markup/programming"
    Height="300" Width="300">
    <Grid>
        <Button Content="Crash Me!">
            <p:Attached.Operations>
                <p:EventHandler Path="Click">
                    <p:Block ContextPath="null">
                        <p:If Value="True">
                            <p:If.Then>
                                <p:When>
                                    <p:Path>true</p:Path>
                                    <p:Block>
                                        <p:Switch Value="2">
                                            <p:Case Value="1"/>
                                            <p:Set Var="$xyzzy" Value="42"/>
                                            <p:Case Value="2"/>
                                            <p:GetItem Index="0"/>
                                        </p:Switch>
                                    </p:Block>
                                </p:When>
                            </p:If.Then>
                        </p:If>
                    </p:Block>
                </p:EventHandler>
            </p:Attached.Operations>
        </Button>
    </Grid>
</UserControl>
